Conditions | 1 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { DependencyNode, NodeSelection } from '../components/types'; |
||
14 | |||
15 | export function createZoom(svgContainer: NodeSelection<SVGSVGElement>, selector: ElementIds.OVERVIEW_ZOOM | ElementIds.DETAILS_ZOOM) { |
||
16 | const zoomLayer = svgContainer.append('g').attr('id', selector); |
||
17 | |||
18 | svgContainer |
||
19 | .call( |
||
20 | zoom<SVGSVGElement, DependencyNode>() |
||
21 | .scaleExtent([MINIMUM_ZOOM_SCALE, MAXIMUM_ZOOM_SCALE]) |
||
22 | .on(`zoom`, changeZoom(selector)) |
||
23 | ) |
||
24 | .on('dblclick.zoom', null); |
||
25 | |||
26 | return zoomLayer; |
||
27 | } |
||
28 |